
var VERSION="";

var initVersion=cc.Class({
    extends: cc.Component,
    statics: {
        _version:VERSION,

        init:function(){
            this._version=cc.LAST_VERSION;
            // console.log("----------------------this.version="+this._version);
        },
        compareVersion:function(){
            var localVersion=cc.sys.localStorage.getItem("version");
            console.log("remote VERSION="+this._version);
            console.log("localVersion="+localVersion);
            if(localVersion){
                console.log("localVersion="+localVersion);
                if(localVersion==this._version){
                    return true;
                }
                return false;
            }
            return false;
        },
        isLastVersion:function(){
            console.log("isLastVersion");
            if(this.compareVersion()){
                return true;
            }
            cc.sys.localStorage.setItem("version",this._version);
            return false;
        },
        sayHi:function(){
            // console.log("sayHi");
         },
    },

});
// var version = cc.Class({
//     extends: cc.Component,

//     statics:{
//         sessionId : 0,
//         userId : 0,
//         master_url:URL,
//         url:URL,
//         sayHi:function(){
//             console.log("sayHi");
//         }
//     },
// });
